<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="zh-CN">
<head>
    <title th:text="登录"></title>
    <meta charset="utf-8">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="keywords" content="WAP游戏,文字游戏,怀旧,mud">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telphone=no,email=no">
    <meta name="misapplication-tap-highlight" content="no">
    <meta name="screen-orientation" content="portrait">
    <meta name="x5-orientation" content="portrait">
    <link rel="stylesheet" type="text/css" th:href="@{/assets/css/bootstrap.min-3.4.0.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/assets/css/font-awesome-4.3.0.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/assets/css/animate.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/assets/css/style-2.2.0.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/assets/css/index.css}" />
    <script th:src="@{/assets/js/flexible.js}" type="text/javascript" ></script>
    <script th:src="@{/assets/js/zepto.min.js}"  type="text/javascript" ></script>
</head>
<body class="gray-bg">
<div class="middle-box text-center loginscreen  animated fadeInDown">
    <div class="form-signin">
        <div id="stage">
            <div id="inner">
                <div id="cover">
                    <div id="text">
                        <span style="color: cyan;">GA</span><span style="color: white;">ME</span>
                    </div>
                    <div id="detail"></div>
                    <div id="handle"></div>
                </div>
                <canvas class="mb-4" id="live2d" width="800" height="800"></canvas>
            </div>
            <a id="info" href="javascript:info()"><i class="fa fa-lg fa-info"></i></a>
            <a id="refresh" href="javascript:refresh()"><i class="fa fa-lg fa-refresh"></i></a>
        </div>
        <h3>新版二次元登录页</h3>

        <!--<form class="m-t" role="form" method="post" action="/H/login">-->
        <form method="post" class="m-t" th:action="@{login}" id="form">
            <div class="form-group">
                <input name="name" type="phone" class="form-control" placeholder="请输入您的帐号"  required="">
            </div>
            <div class="form-group">
                <input name="password" type="password" class="form-control" placeholder="请输入您的密码" required="">
            </div>

            <button type="submit" class="btn btn-primary block full-width m-b">登 录</button>
            <div class="form-group">
                <div class="checkbox i-checks">
                    <span class="text-muted text-center"><a href="register">注册一个新账号</a>
                        </span>
                </div>
            </div>
            <img th:src="@{/assets/picture/1.gif}" style="width: 100%;">
        </form>
    </div>
</div>

<!-- Mainly scripts -->
<script th:src="@{/assets/js/jquery-2.1.1.min.js}" type="text/javascript" ></script>
<script th:src="@{/assets/js/bootstrap.min-3.4.0.js}" type="text/javascript" ></script>
<script type="text/javascript">
    function stop() {
        return false;
    }
    document.oncontextmenu = stop;
</script>
<script th:src="@{/assets/js/live2d.min.js}" type="text/javascript" ></script>
<script th:src="@{/assets/js/index.js}" type="text/javascript" ></script>
</body>
</html>
<script type="text/javascript">
    // 提交验证
    $('.submit button').click(function(){
        var name = $('input[name=name]').val();
        var password = $('input[name=password]').val();
        if(!/^[A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(name)){
            alert("请先输入正确帐号")
            return
        }
        if($.trim(name)==''){
            alert("请输入帐号")
            $('input[name=name]').focus()
            return false
        }
        if($.trim(password)==''){
            alert("请输入密码")
            $('input[name=password]').focus()
            return false
        }
        $("#form").submit;

    })
</script>